-- GENERATED SPELL FOR [Alexi Barov] --


function spell0_11022(pUnit, Event) --@Backstab,n/a--
pUnit:FullCastSpellOnTarget(7159,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_11022', 638, 1)
end

function spell1_11022(pUnit, Event) --@Kick,n/a--
pUnit:FullCastSpellOnTarget(15614,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_11022', 6253, 1)
end

function spell2_11022(pUnit, Event) --@Rupture,n/a--
pUnit:FullCastSpellOnTarget(15583,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_11022', 10000, 1)
end

function spell3_11022(pUnit, Event) --@Sinister Strike,n/a--
pUnit:FullCastSpellOnTarget(14873,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_11022', 630, 1)
end

function Sorts_11022(pUnit, Event)
local choix_sorts_11022 = math.random(0, 3)
if choix_sorts_11022 == 0 then
pUnit:RegisterEvent('spell0_11022', 1, 1)
end
if choix_sorts_11022 == 1 then
pUnit:RegisterEvent('spell1_11022', 1, 1)
end
if choix_sorts_11022 == 2 then
pUnit:RegisterEvent('spell2_11022', 1, 1)
end
if choix_sorts_11022 == 3 then
pUnit:RegisterEvent('spell3_11022', 1, 1)
end
end

function mob11022_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_11022', math.random(1500, 3000), 1)
end

function mob11022_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob11022_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob11022_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(11022, 1, 'mob11022_Action')
RegisterUnitEvent(11022, 2, 'mob11022_Leave')
RegisterUnitEvent(11022, 3, 'mob11022_Kill')
RegisterUnitEvent(11022, 4, 'mob11022_Die')
